<template>
	<view class="page">
		<uni-nav-bar
			  class="page-header"
			  :statusBar="true"
			  :fixed="true"
			  :border="true"
			  rightIcon="iconfont icon-saomiao"
			>
			 <view class="content">
				<view class="logo"></view>
				<view class="title"> 智能实验室安全管理助手 </view>
				<view class="iconfont icon-liebiao shaomiao" @click="$tool.goToPage('/pages/DeviceList/index?searchType=tianjia')"></view>
			</view>
		</uni-nav-bar>
		<view class="page-content">
			<view class="from">
				<view class="from-item">
					<view class="from-item-title">院校</view>
					<view class="from-item-value">
						<zs-picker class="zs-picker"
						:fieldNames="{label: 'depart_name', value: 'ID'}" 
						:options="schoolOptions" 
						@change="onChangeSchool"
						placeholder="请选择院校"
						v-model="schoolValue"
						/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">学院</view>
					<view class="from-item-value">
						<zs-picker class="zs-picker"
						:fieldNames="{label: 'depart_name', value: 'ID'}" 
						:options="xyOptions"
						 @change="onChangexy"
						 v-model="xtyValue"
						 placeholder="请选择学院"/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">实验室</view>
					<view class="from-item-value">
						<zs-picker class="zs-picker"
						v-model="fromData.orgcode"
						:fieldNames="{label: 'depart_name', value: 'ID'}" 
						:options="sysOptions" 
						placeholder="请选择实验室"/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">设备类型</view>
					<view class="from-item-value">
						<zs-picker class="zs-picker" rightIcon="icon-youjiantou" v-model="fromData.sblx" 
						:fieldNames="{label: 'name', value: 'id'}" 
						 :options="sblxOptions" 
						 placeholder="请选择设备类型"/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">设备编码</view>
					<view class="from-item-value">
						<input class="uni-input" placeholder="请输入设备编码" v-model="fromData.sbbh"/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">设备名称</view>
					<view class="from-item-value">
						<input class="uni-input" placeholder="请输入设备名称" v-model="fromData.sbmc"/>
					</view>
				</view>
				<view class="from-item">
					<view class="from-item-title">添加二维码</view>
					<view class="from-item-value">
						<input class="uni-input" placeholder="去绑定" v-model="fromData.sbewm"  disabled/>
						<text class="iconfont icon-saomiao" @click="onSaoMiao">&#xe568;</text>
					</view>
				</view>
			</view>
			<view class="from">
				<view class="from-item column" style="align-items: flex-start;">
					<view class="from-item-title">图片备注</view>
					<view class="from-item-value" style="border: none;">
						<uni-file-picker class="upload" v-model="images" limit="1"  @select="select" @delete="onDeleteFile"></uni-file-picker>
					</view>
				</view>
			</view>
			<view class="submit" @click="onSubmit">提  交</view>
		</view>
	</view>
</template>
<script src='./index.js'></script>
<style lang="less" src="./index.less"></style>